package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author 朱其鹏
 * @date 2024/3/21 21:33
 */
@Data
@TableName("theme_configs")
public class ThemeConfigEntity {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String data;

    private Long cinemaId;
    
    @ApiModelProperty(value = "租户ID")
    private Long tenantId;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableLogic(value = "null", delval = "now()")
    @TableField(select = false)
    private LocalDateTime deletedAt;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public Long getCinemaId() {
        return cinemaId;
    }

    public void setCinemaId(Long cinemaId) {
        this.cinemaId = cinemaId;
    }

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    public LocalDateTime getDeletedAt() {
        return deletedAt;
    }

    public void setDeletedAt(LocalDateTime deletedAt) {
        this.deletedAt = deletedAt;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("ThemeConfigEntity{");
        sb.append("id=").append(id);
        sb.append(", data='").append(data).append('\'');
        sb.append(", cinemaId=").append(cinemaId);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", deletedAt=").append(deletedAt);
        sb.append('}');
        return sb.toString();
    }
    
    public ThemeConfigEntity() {
    }
    
    public ThemeConfigEntity(String data, Long cinemaId) {
        this.data = data;
        this.cinemaId = cinemaId;
    }
    
    public ThemeConfigEntity(String data, Long cinemaId, Long tenantId) {
        this.data = data;
        this.cinemaId = cinemaId;
        this.tenantId = tenantId;
    }
}